1. Field of the Invention
The present invention relates to a wireless communications system. More specifically, the present invention discloses a method correcting ciphering status maintenance in a wireless communications system.
2. Description of the Prior Art
Please refer to FIG. 1. FIG. 1 is a simple block diagram of a prior art wireless communications system 10, as defined by the 3rd Generation Partnership Project (3GPP) specifications 3GPP TS 25.322 V3.10.0 “RLC Protocol Specification”, and 3GPP TS 25.331 V3.10.0 “Radio Resource Control (RRC) Specification”, which are included herein by reference. The wireless communications system 10 comprises a plurality of radio network subsystems (RNSs) 20 in communications with a core network (CN) 30. The plurality of RNSs 20 is termed a Universal Mobile Telecommunications System (UMTS) Terrestrial Radio Access Network, or UTRAN 20u for short. Each RNS 20 comprises one radio network controller (RNC) 22 that is in communications with a plurality of Node Bs 24. Each Node B 24 is a transceiver, which is adapted to send and receive wireless signals, and which defines a cell region. A plurality of Node Bs 24 defines a UTRAN Registration Area (URA). The wireless communications system 10 assigns a mobile unit 40 (generally termed a “UE” for User Equipment) to a particular RNS 20, which is then termed the serving RNS (SRNS) 20s of the UE 40.
Please refer to FIG. 2. FIG. 2 is a simplified block diagram of the UTRAN 20u in wireless communications with the UE 40 of FIG. 1. The UTRAN 20u communicates with the UE 40 over a plurality of radio bearers 12. The UE 40 thus has corresponding radio bearers 22, one for each of the radio bearers 12. Each radio bearer 12 has a receiving buffer 12r for holding protocol data units (PDUs) 11r received from the corresponding radio bearer 22 of the UE 40.
Each radio bearer 12 also has a transmitting buffer 12t for holding PDUs 11t that are awaiting transmission to the corresponding radio bearer 22 of the UE 40. A PDU 11t is transmitted by the UTRAN 20u along a radio bearer 12 and received by the UE 40 to generate a corresponding PDU 21r in a receiving buffer 22r of the corresponding radio bearer 22. Similarly, a PDU 21t is transmitted by the UE 40 along a radio bearer 22 and received by the UTRAN 20u to generate a corresponding PDU 11r in the receiving buffer 12r of the corresponding radio bearer 12.
For the sake of consistency, the data structures of pair entity PDUs 11t, 21r, and 21t, 11r along corresponding radio bearers 12 and 22 are identical. That is, a transmitted PDU 11t generates an identical corresponding received PDU 21r, and a transmitted PDU 21t generates an identical corresponding PDU 11r. Although the data structure of each pair entity PDU 11t, 21r, and 21t, 11r along corresponding radio bearers 12 and 22 is identical, different radio bearers 12, 22 may use different PDU data structures according to the type of connection agreed upon along the peer entity radio bearers 12, 22.
There are two distinct connection methods, or domains, within the core network 30 for carrying PDUs 11t, 21t: a circuit switched (CS) domain 30c and a packet switched (PS) domain 30p. A CS connection 30c provides a dedicated path to a single connection and no other stations can use that dedicated path until the call is finished. Circuit switching uses a constant bit rate (CBR) and is frequently called synchronous switching because the PDUs 11t, 21t are transmitted only in the specific dedicated path.
On the other hand, packet switching (PS) 30p breaks down data streams into variably sized packets (PDUs 11t, 21t) that are transmitted with a variable bit rate (VBR) in bursts over radio bearers 12, 22 that are shared with other stations on a first come, first serve basis. For this reason, packet switching is often referred to an asynchronous switching.
In general, every PDU 11r, 11t, 21r and 21t will have a sequence number 5r, 5t, 6r, 6t. The sequence number 5r, 5t, 6r, 6t is an m-bit number that is incremented for each PDU 11r, 11t, 21r, 21t. The magnitude of the sequence number 5r, 5t, 6r, 6t indicates the sequential ordering of the PDU 11r, 11t, 21r, 21t in its buffer 12r, 12t, 22r, 22t. For example, a received PDU 11r with a sequence number 5r of 108 is sequentially before a received PDU 11r with a sequence number 5r of 109, and sequentially after a PDU 11r with a sequence number 5r of 107. The sequence number 5t, 6t is often explicitly carried by the PDU 11t, 21t, but may also be implicitly assigned by the UTRAN 20u or UE 40. For example, in an acknowledged mode (AM) setup for corresponding radio bearers 12 and 22, each transmitted PDU 11t explicitly carries a 12-bit sequence number 5t; successful reception of each transmitted PDU 11t generates an identical corresponding PDU 21r and is acknowledged as received by the UE 40 by using the sequence number 6r of the received PDU 21r. 
A 12-bit sequence number 5t is explicitly carried by each PDU 11t in acknowledged mode transmissions. The UE 40 scans the sequence numbers 6r embedded within the received PDUs 21r to determine the sequential ordering of the PDUs 21r, and to determine if any PDUs 21r are missing. The UE 40 can then send a message to the UTRAN 20u that indicates which PDUs 21r were received by using the sequence numbers 6r of each received PDU 21r, or may request that a PDU 11t be re-transmitted by specifying the sequence number 5t of the PDU 11t to be re-transmitted.
Alternatively, in an unacknowledged transmission mode (UM), 7-bit sequence numbers 5t, 6t are explicitly carried by the transmitted PDUs 11t, 21t, but received PDUs 11r, 21r are not acknowledged as successfully received. In certain special cases, such as a transparent transmission mode, sequence numbers are not even assigned to PDUs 11t, 11r, 21t, 21r. 
The PDUs 11t and 21t are generally not transmitted “out in the open”. A ciphering engine 14 on the UTRAN 20u and a corresponding ciphering engine 24 on the UE 40 together ensure secure and private exchanges of data exclusively between the UTRAN 20u and the UE 40. A function of the ciphering engine 14, 24 is the obfuscation (i.e., ciphering, or encryption) of data held within a transmitted PDU 11t, 21t so that the corresponding PDU 11r, 21r presents a meaningless collection of random numbers to an eavesdropper.
PS domain 30p and CS domain 30c connections can simultaneously co-exist between the UTRAN 20u and the UE 40 and one, none, or both of the PS and the CS domains 30p, 30c can make use of ciphering. Therefore, when transmitting a PDU 11t, the ciphering engine 14 uses, amongst other inputs, a ciphering key 14p (for PS domain 30p connections) and a ciphering key 14c (for CS domain 30c connections) to perform ciphering functions upon a PDU 11t. 
To properly decipher a corresponding PDU 21r, the corresponding ciphering engine 24 must use an identical ciphering key 24p or 24c depending on the specific domain 30p, 30c currently in use. The ciphering keys 14p, 24p, and 14c, 24c are different for the respective domains but remain constant across all PDUs 11t, 21t within a specific domain (and thus corresponding PDUs 21r, 11r) and radio bearers 12, 22, until explicitly changed by both the UTRAN 20u and the UE 40.
Changing of the ciphering keys 14p, 24p and 14c, 24c is effected by a security mode reconfiguration process that involves handshaking between the UTRAN 20u and the UE 40 to ensure proper synchronization of the ciphering engines 14, 24. The UTRAN 20u typically initiates the security mode reconfiguration process. Security mode reconfiguration is used to change the ciphering keys 14p, 24p and 14c, 24c and to both activate and deactivate ciphering of transmitted PDUs 11t, 21t. 
Security mode reconfiguration is a somewhat complicated process that involves several steps. One of the initial steps is the transmitting by the UTRAN 20u of a ciphering reconfiguration message, a so-called security mode command, along a special signaling radio bearer 12s to the UE 40. The security mode command indicates the new ciphering configuration that is to be used by the UTRAN 20u and the UE 40, such as the use of the new ciphering key 14n, 24n, or the activation or deactivation of PDU 11t, 21t ciphering.
Note that the security mode command is itself carried by one or more PDUs 11t, and thus may be enciphered under the old ciphering configuration, i.e., using the ciphering key 14p or 14c depending on the domain for which the most recent security negotiation took place. The radio bearer 12s is an acknowledged mode radio bearer, and thus the UE 40 will explicitly acknowledge using the radio bearer 22s the successful reception of each PDU 11t that carries the security mode command as shown in FIG. 3. In this manner, the UTRAN 20u can be certain that the security mode command was received and processed by the UE 40.
An Information Element (IE) has an enumerated variable maintaining a ciphering status 25 in the UE 40 holding information about the current status of ciphering in the UE 40, and can be set to either “Not started” or “Started”. The UTRAN 20u comprises a corresponding variable 15 to maintain the ciphering status information in the UTRAN 20u. When a security mode command is received by the UE 40 indicating the activation of PDU 11t, 21t ciphering, the ciphering status variable 25 in the UE 40 is set to “Started”. When a security mode command is received by the UE 40 indicating the deactivation of PDU 11t, 21t ciphering, the ciphering status variable 25 in the UE 40 is set to “Not started”. When transmitting PDUs 21t or receiving PDUs 21r, the UE 40 checks the value of the variable ciphering status 25 to determine if ciphering is to be used to encrypt/decrypt the PDUs 21t, 21r. If the value of the ciphering status variable 25 is set to “Not started”, ciphering is not used. If the value of the ciphering status variable 25 is set to “Started”, the ciphering engine 24 and the ciphering key 24c or 24p is be used, depending upon the domain 30p, 30c of the associated radio bearer 22.
A problem in the prior art occurs when the UTRAN 20u and the UE 40 are using both the PS domain and the CS domain for wireless communications. Although the ciphering keys 14p, 24p and 14c, 24c are domain specific, the ciphering status variable 25 is not domain specific because there is only one ciphering status variable 25 in the UE 40.
For example, consider the following scenario:
1) A PS connection is established and a security mode command is sent from the UTRAN 20u to the UE 40 initiating a security mode control procedure to start ciphering for the PS domain. The ciphering status variable 25 is set to “Started” and ciphering is started for the PS connection.
2) A CS connection is subsequently established between the UTRAN 20u and the UE 40, and the UTRAN 20u does not send a security mode command to the UE 40 specifying that ciphering is to be used in the CS connection. Therefore, the UTRAN 20u is sending and expects to receive un-ciphered PDUs 11r, 11t when using the CS mode connection. However, when the UE 40 transmits or receives the respective PDUs 21t or 21r, the UE 40 checks the value of the ciphering status variable 25 to determine if ciphering is to be used with the PDUs 21t, 21r. Consequently, the UE 40 begins ciphering of the CS PDUs 21t, 21r because the ciphering status variable 25 was previously set to a value of “Started” by the security mode command intended only for the PS connection. Obviously, using the ciphering engine 14 in this situation has undesirable consequences and results in the PDUs 21t, 21r being converted into a meaningless collection of random numbers.